{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "91ccbd98-a9b9-4e5f-ada8-08db45b1a9da",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>keyword</th>\n",
       "      <th>positionName</th>\n",
       "      <th>companyFullName</th>\n",
       "      <th>companySize</th>\n",
       "      <th>industryField</th>\n",
       "      <th>financeStage</th>\n",
       "      <th>companyLabelList</th>\n",
       "      <th>firstType</th>\n",
       "      <th>secondType</th>\n",
       "      <th>thirdType</th>\n",
       "      <th>...</th>\n",
       "      <th>city</th>\n",
       "      <th>district</th>\n",
       "      <th>salary</th>\n",
       "      <th>workYear</th>\n",
       "      <th>jobNature</th>\n",
       "      <th>education</th>\n",
       "      <th>positionAdvantage</th>\n",
       "      <th>positionDetail</th>\n",
       "      <th>skillLables</th>\n",
       "      <th>positionId</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>北京华航唯实机器人科技股份有限公司</td>\n",
       "      <td>150-500人</td>\n",
       "      <td>制造业,软件服务｜咨询,智能硬件</td>\n",
       "      <td>未融资</td>\n",
       "      <td>['带薪年假', '绩效奖金', '午餐补助']</td>\n",
       "      <td>开发|测试|运维类</td>\n",
       "      <td>人工智能</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>...</td>\n",
       "      <td>北京</td>\n",
       "      <td>海淀区</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>不限</td>\n",
       "      <td>全职</td>\n",
       "      <td>硕士</td>\n",
       "      <td>双休、全额五险一金、年假、餐补</td>\n",
       "      <td>任职资格： \\n&lt;br /&gt;1、机器人、自动化控制、 应用数学等相关专业； \\n&lt;br /&gt;...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>北京字节跳动网络技术有限公司</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>内容资讯,短视频</td>\n",
       "      <td>D轮及以上</td>\n",
       "      <td>['扁平管理', '弹性工作', '就近租房补贴', '六险一金']</td>\n",
       "      <td>开发|测试|运维类</td>\n",
       "      <td>数据开发</td>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>...</td>\n",
       "      <td>北京</td>\n",
       "      <td>海淀区</td>\n",
       "      <td>20k-40k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>全职</td>\n",
       "      <td>本科</td>\n",
       "      <td>下午茶,六险一金,团队氛围好,带薪休假</td>\n",
       "      <td>职位职责： \\n&lt;br /&gt;1、研究数据挖掘或统计学习领域的前沿技术，针对海量用户行为和内容...</td>\n",
       "      <td>['数据挖掘']</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>北京兰云科技有限公司</td>\n",
       "      <td>50-150人</td>\n",
       "      <td>信息安全</td>\n",
       "      <td>B轮</td>\n",
       "      <td>['五险一金', '年终分红', '带薪年假', '定期体检']</td>\n",
       "      <td>开发|测试|运维类</td>\n",
       "      <td>数据开发</td>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>...</td>\n",
       "      <td>南京</td>\n",
       "      <td>玄武区</td>\n",
       "      <td>16k-20k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>全职</td>\n",
       "      <td>本科</td>\n",
       "      <td>五险一金、带薪年假、定期体检、节日福利</td>\n",
       "      <td>岗位职责： \\n&lt;br /&gt;1、基于海量用户及信息系统实体行为数据，开展数据探索，挖掘潜在安...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>智库人工智能科技（广州）有限公司</td>\n",
       "      <td>50-150人</td>\n",
       "      <td>数据服务｜咨询</td>\n",
       "      <td>上市公司</td>\n",
       "      <td>[]</td>\n",
       "      <td>开发|测试|运维类</td>\n",
       "      <td>人工智能</td>\n",
       "      <td>机器学习</td>\n",
       "      <td>...</td>\n",
       "      <td>广州</td>\n",
       "      <td>海珠区</td>\n",
       "      <td>15k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>全职</td>\n",
       "      <td>本科</td>\n",
       "      <td>劳动法健全 发展空间大 高补贴</td>\n",
       "      <td>&lt;p&gt;岗位描述：\\n&lt;br/&gt;\\n&lt;br/&gt;1.负责金融，保险，零售，物联网等领域的AI项目...</td>\n",
       "      <td>['数据挖掘']</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>数据挖掘</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>联通数字科技有限公司</td>\n",
       "      <td>2000人以上</td>\n",
       "      <td>IT技术服务｜咨询,软件服务｜咨询</td>\n",
       "      <td>不需要融资</td>\n",
       "      <td>[]</td>\n",
       "      <td>开发|测试|运维类</td>\n",
       "      <td>人工智能</td>\n",
       "      <td>算法工程师</td>\n",
       "      <td>...</td>\n",
       "      <td>北京</td>\n",
       "      <td>西城区</td>\n",
       "      <td>20k-30k</td>\n",
       "      <td>3-5年</td>\n",
       "      <td>全职</td>\n",
       "      <td>本科</td>\n",
       "      <td>数据挖掘工程师/算法工程师</td>\n",
       "      <td>工作职责: \\n&lt;br /&gt;1. 负责/参与联通安全大脑平台相关业务数据挖掘产品的需求讨论，...</td>\n",
       "      <td>[]</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  keyword positionName    companyFullName companySize      industryField  \\\n",
       "0    数据挖掘        算法工程师  北京华航唯实机器人科技股份有限公司    150-500人   制造业,软件服务｜咨询,智能硬件   \n",
       "1    数据挖掘        算法工程师     北京字节跳动网络技术有限公司     2000人以上           内容资讯,短视频   \n",
       "2    数据挖掘        算法工程师         北京兰云科技有限公司     50-150人               信息安全   \n",
       "3    数据挖掘        算法工程师   智库人工智能科技（广州）有限公司     50-150人            数据服务｜咨询   \n",
       "4    数据挖掘        算法工程师         联通数字科技有限公司     2000人以上  IT技术服务｜咨询,软件服务｜咨询   \n",
       "\n",
       "  financeStage                    companyLabelList  firstType secondType  \\\n",
       "0          未融资            ['带薪年假', '绩效奖金', '午餐补助']  开发|测试|运维类       人工智能   \n",
       "1        D轮及以上  ['扁平管理', '弹性工作', '就近租房补贴', '六险一金']  开发|测试|运维类       数据开发   \n",
       "2           B轮    ['五险一金', '年终分红', '带薪年假', '定期体检']  开发|测试|运维类       数据开发   \n",
       "3         上市公司                                  []  开发|测试|运维类       人工智能   \n",
       "4        不需要融资                                  []  开发|测试|运维类       人工智能   \n",
       "\n",
       "  thirdType  ... city district   salary workYear jobNature education  \\\n",
       "0     算法工程师  ...   北京      海淀区  15k-30k       不限        全职        硕士   \n",
       "1      数据挖掘  ...   北京      海淀区  20k-40k     3-5年        全职        本科   \n",
       "2      数据挖掘  ...   南京      玄武区  16k-20k     3-5年        全职        本科   \n",
       "3      机器学习  ...   广州      海珠区  15k-30k     3-5年        全职        本科   \n",
       "4     算法工程师  ...   北京      西城区  20k-30k     3-5年        全职        本科   \n",
       "\n",
       "     positionAdvantage                                     positionDetail  \\\n",
       "0      双休、全额五险一金、年假、餐补  任职资格： \\n<br />1、机器人、自动化控制、 应用数学等相关专业； \\n<br />...   \n",
       "1  下午茶,六险一金,团队氛围好,带薪休假  职位职责： \\n<br />1、研究数据挖掘或统计学习领域的前沿技术，针对海量用户行为和内容...   \n",
       "2  五险一金、带薪年假、定期体检、节日福利  岗位职责： \\n<br />1、基于海量用户及信息系统实体行为数据，开展数据探索，挖掘潜在安...   \n",
       "3      劳动法健全 发展空间大 高补贴  <p>岗位描述：\\n<br/>\\n<br/>1.负责金融，保险，零售，物联网等领域的AI项目...   \n",
       "4        数据挖掘工程师/算法工程师  工作职责: \\n<br />1. 负责/参与联通安全大脑平台相关业务数据挖掘产品的需求讨论，...   \n",
       "\n",
       "  skillLables positionId  \n",
       "0          []        NaN  \n",
       "1    ['数据挖掘']        NaN  \n",
       "2          []        NaN  \n",
       "3    ['数据挖掘']        NaN  \n",
       "4          []        NaN  \n",
       "\n",
       "[5 rows x 22 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 加载数据\n",
    "import pandas as pd \n",
    "file_path = '拉勾网2023招聘数据.csv'\n",
    "data = pd.read_csv(file_path)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "0bb321fd-f431-44fc-b799-e5d4982a6353",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 处理重复值\n",
    "data = data.drop_duplicates()\n",
    "\n",
    "# 数据类型转换\n",
    "data['createTime'] = pd.to_datetime(data['createTime'])\n",
    "\n",
    "# 自定义函数示例：提取薪资下限和上限\n",
    "def extract_salary(salary):\n",
    "    if pd.isna(salary):\n",
    "        return None, None\n",
    "    parts = salary.lower().replace('k', '').split('-')\n",
    "    if len(parts) == 2:\n",
    "        return int(parts[0]), int(parts[1])\n",
    "    else:\n",
    "        return None, None\n",
    "\n",
    "# 应用自定义函数\n",
    "data['salary_lower'], data['salary_upper'] = zip(*data['salary'].apply(extract_salary))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "5361f31e-c03c-4872-9a59-847b0eeec771",
   "metadata": {},
   "outputs": [],
   "source": [
    "from zhipuai import ZhipuAI\n",
    "\n",
    "def init_ai():\n",
    "    return  ZhipuAI(api_key=\"3648d03d25a9440088e907b567714673.E4f7jmIL4bwpS9lw\") # 请填写您自己的APIKey\n",
    "\n",
    "def chatTools(client, messages, tools, temperature=0.6):\n",
    "    response = client.chat.completions.create(\n",
    "        model='chatglm_turbo',\n",
    "        messages=messages,\n",
    "        tools=tools,\n",
    "        temperature=temperature\n",
    "    )\n",
    "    # 检查response.choices[0]是否有message属性\n",
    "    if hasattr(response.choices[0], 'message'):\n",
    "        return response.choices[0].message.content\n",
    "    else:\n",
    "        raise ValueError(\"Response format is unexpected\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "615b81cd-ca3f-43b8-812a-4a9b97ce1879",
   "metadata": {},
   "outputs": [],
   "source": [
    "def convert_to_natural_language(user_question, function_result, prompt_info):\n",
    "    # 构建提示词\n",
    "    prompt = f'用户提问: {user_question}\\n函数调用结果: {function_result}\\n提示信息: {prompt_info}'\n",
    "    # 初始化 AI 客户端\n",
    "    client = init_ai()\n",
    "    # 构建 messages 格式\n",
    "    messages = [\n",
    "        {\"role\": \"user\", \"content\": prompt}\n",
    "    ]\n",
    "    # 调用大模型 API\n",
    "    response = chatTools(client, messages, tools=[], temperature=0.6)\n",
    "    return response"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "534f4d34-b5cd-4fa4-a83b-30784f1278f4",
   "metadata": {},
   "outputs": [],
   "source": [
    "def generate_prompt_template(user_question, query_result):\n",
    "    return f\"\"\"用户的提问是：\"{user_question}\"\\n根据本地数据查询结果是:{query_result}\\n请以自然语言的方式，以简洁易懂的风格，300 字以内，对结果进行一些扩展发挥。\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1380b6b8-a0d7-459c-818b-5cf8d44ae58c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 自定义函数：查询地区职位平均薪资\n",
    "def query_average_salary(city, job_name):\n",
    "    job_data = data[(data['city'] == city) & (data['positionName'] == job_name)]\n",
    "    if not job_data.empty:\n",
    "        avg_salary = job_data['salary_lower'].mean()\n",
    "        return avg_salary\n",
    "    else:\n",
    "        return \"未找到相关职位\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "d57c7a94-a09e-4a95-a054-7cc03e9521ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 自定义函数：查询地区职位薪资区间\n",
    "def query_salary_range(city, job_name):\n",
    "    job_data = data[(data['city'] == city) & (data['positionName'] == job_name)]\n",
    "    if not job_data.empty:\n",
    "        min_salary = job_data['salary_lower'].min()\n",
    "        max_salary = job_data['salary_upper'].max()\n",
    "        return min_salary, max_salary\n",
    "    else:\n",
    "        return \"未找到相关职位\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "5d87a31a-e9ed-4802-9fd6-bfb9492ff786",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 自定义函数：查询地区职位工作经验要求\n",
    "def query_experience_requirement(city, job_name):\n",
    "    job_data = data[(data['city'] == city) & (data['positionName'] == job_name)]\n",
    "    if not job_data.empty:\n",
    "        exp_req = job_data['workYear'].mode()[0] if not job_data['workYear'].empty else \"无特定要求\"\n",
    "        return exp_req\n",
    "    else:\n",
    "        return \"未找到相关职位\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "e8288a09-1ba9-4de6-8ec7-2e3dbc9cdeed",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "测试用例 1:\n",
      "用户问题: 上海地区算法工程师的薪资一般在什么区间？\n",
      "系统回答: 调用了函数`query_salary_range`，参数为`{'city': '上海', 'job_name': '算法工程师'}`，查询结果显示上海地区算法工程师的薪资一般在1万元至200万元之间。\n",
      "\n",
      "在上海，算法工程师的薪资差异较大，这主要取决于工作经验、技术能力以及所在公司的规模和行业。初级算法工程师的薪资可能在1万元左右，而具备丰富经验和高级技能的算法工程师，薪资可以高达200万元。这表明，算法工程师是一个高技术含量、高收入的职位，对于有志于从事这一行业的人来说，不断提升自己的技能和经验是提高薪资的关键。\n",
      "\n",
      "测试用例 2:\n",
      "用户问题: 深圳地区Java工程师的平均工资是多少？\n",
      "系统回答: 根据查询结果，调用函数`query_average_salary`，参数为`{'city': '深圳', 'job_name': 'Java工程师'}`，深圳地区Java工程师的平均工资约为17,582元。\n",
      "\n",
      "在深圳，Java工程师作为软件开发领域的重要岗位，其薪资水平反映了市场需求和技术价值。这一平均薪资水平相对较高，显示出深圳对Java工程师的需求较大，同时也说明该职位在当地的竞争激烈。Java工程师要想在深圳获得更高的薪资，需要不断提升自己的技术能力和项目经验，以满足不断变化的市场需求。此外，拥有良好的团队合作能力和沟通技巧也是提升薪资的重要因素。\n",
      "\n",
      "测试用例 3:\n",
      "用户问题: 北京地区招聘Python工程师对工作经验有什么要求？\n",
      "系统回答: 调用的函数是`query_experience_requirement`，参数为`{'city': '北京', 'job_name': 'Python工程师'}`。\n",
      "\n",
      "根据查询结果，北京地区招聘Python工程师通常要求3-5年的工作经验。这表明在该地区，企业更倾向于招聘有一定项目经验和实际操作能力的候选人。拥有3-5年经验的Python工程师通常具备较为扎实的编程基础，能够独立解决复杂的技术问题，并且对Python相关的开发框架和工具较为熟悉。这样的经验水平能够满足企业对于项目开发和团队协作的需求。因此，如果您是一名Python工程师，并且拥有3-5年的工作经验，那么在北京找到一份合适的工作机会将会相对容易。\n"
     ]
    }
   ],
   "source": [
    "import json\n",
    "# 修改工具定义：替换为招聘数据相关函数\n",
    "tools = [\n",
    "    {\n",
    "        \"type\": \"function\",\n",
    "        \"function\": {\n",
    "            \"name\": \"query_average_salary\",\n",
    "            \"description\": \"根据城市和职位名称查询该职位的平均薪资\",\n",
    "            \"parameters\": {\n",
    "                \"type\": \"object\",\n",
    "                \"properties\": {\n",
    "                    \"city\": {\"type\": \"string\", \"description\": \"目标城市，如'上海'\"},\n",
    "                    \"job_name\": {\"type\": \"string\", \"description\": \"职位名称，如'算法工程师'\"}\n",
    "                },\n",
    "                \"required\": [\"city\", \"job_name\"]\n",
    "            }\n",
    "        }\n",
    "    },\n",
    "    {\n",
    "        \"type\": \"function\",\n",
    "        \"function\": {\n",
    "            \"name\": \"query_salary_range\",\n",
    "            \"description\": \"根据城市和职位名称查询该职位的薪资范围\",\n",
    "            \"parameters\": {\n",
    "                \"type\": \"object\",\n",
    "                \"properties\": {\n",
    "                    \"city\": {\"type\": \"string\", \"description\": \"目标城市\"},\n",
    "                    \"job_name\": {\"type\": \"string\", \"description\": \"职位名称\"}\n",
    "                },\n",
    "                \"required\": [\"city\", \"job_name\"]\n",
    "            }\n",
    "        }\n",
    "    },\n",
    "    {\n",
    "        \"type\": \"function\",\n",
    "        \"function\": {\n",
    "            \"name\": \"query_experience_requirement\",\n",
    "            \"description\": \"根据城市和职位名称查询该职位的常见工作经验要求\",\n",
    "            \"parameters\": {\n",
    "                \"type\": \"object\",\n",
    "                \"properties\": {\n",
    "                    \"city\": {\"type\": \"string\", \"description\": \"目标城市\"},\n",
    "                    \"job_name\": {\"type\": \"string\", \"description\": \"职位名称\"}\n",
    "                },\n",
    "                \"required\": [\"city\", \"job_name\"]\n",
    "            }\n",
    "        }\n",
    "    }\n",
    "]\n",
    "\n",
    "# 自动处理函数调用的核心逻辑\n",
    "def process_user_question(user_question):\n",
    "    client = init_ai()\n",
    "    messages = [{\"role\": \"user\", \"content\": user_question}]\n",
    "    \n",
    "    # Step 1: 解析用户问题并获取函数调用信息\n",
    "    response = client.chat.completions.create(\n",
    "        model=\"glm-4\",\n",
    "        messages=messages,\n",
    "        tools=tools,\n",
    "        tool_choice=\"auto\",\n",
    "    )\n",
    "    \n",
    "    # 提取函数调用信息\n",
    "    tool_call = response.choices[0].message.tool_calls[0]\n",
    "    func_name = tool_call.function.name\n",
    "    params = json.loads(tool_call.function.arguments) \n",
    "    \n",
    "    # Step 2: 调用本地函数\n",
    "    if func_name == \"query_average_salary\":\n",
    "        result = query_average_salary(params[\"city\"], params[\"job_name\"])\n",
    "    elif func_name == \"query_salary_range\":\n",
    "        result = query_salary_range(params[\"city\"], params[\"job_name\"])\n",
    "    elif func_name == \"query_experience_requirement\":\n",
    "        result = query_experience_requirement(params[\"city\"], params[\"job_name\"])\n",
    "    else:\n",
    "        result = \"未找到对应的处理函数\"\n",
    "    \n",
    "    # Step 3: 将结果转换为自然语言（包含函数调用信息）\n",
    "    prompt_template = f\"\"\"\n",
    "    用户提问：{user_question}\n",
    "    调用函数：{func_name}\n",
    "    调用参数：{params}\n",
    "    查询结果：{result}\n",
    "    请用自然语言回答用户问题，以简洁易懂的风格，300 字以内，对结果进行一些扩展发挥,并在回答开头说明调用的函数和参数。\n",
    "    \"\"\"\n",
    "    \n",
    "    final_response = chatTools(client, [{\"role\": \"user\", \"content\": prompt_template}], tools=[])\n",
    "    return final_response\n",
    "\n",
    "# 修改测试函数\n",
    "def test_function_calls():\n",
    "    questions = [\n",
    "        \"上海地区算法工程师的薪资一般在什么区间？\",\n",
    "        \"深圳地区Java工程师的平均工资是多少？\",\n",
    "        \"北京地区招聘Python工程师对工作经验有什么要求？\"\n",
    "    ]\n",
    "    \n",
    "    for idx, question in enumerate(questions, 1):\n",
    "        print(f\"\\n测试用例 {idx}:\")\n",
    "        print(\"用户问题:\", question)\n",
    "        answer = process_user_question(question)\n",
    "        print(\"系统回答:\", answer)\n",
    "\n",
    "# 运行测试\n",
    "test_function_calls()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e14adcc5-b2c7-49e8-b38e-224f4d585fbb",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
